<%-- 
    Document   : CreationReport
    Created on : Sep 10, 2011, 12:03:14 PM
    Author     : Mikeno
--%>
<%@page import="java.util.*,hyper.market.beans.*,java.io.*"%>
<%@page contentType="text/html"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="errorlist" class="java.util.ArrayList" scope="session"/>
<jsp:useBean id="storenamelist" class="java.util.ArrayList" scope="session"/>
<jsp:useBean id="stock" class="hyper.market.beans.StockBean" scope="session"/>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <link rel="stylesheet" href="style/desk.css" type="text/css" />
        <link rel="stylesheet" href="style/960.css" type="text/css" />
        <link rel="stylesheet" href="style/960_12_col.css" type="text/css" />
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Report</title>

    </head>
    <body>
        <div class="header group">
            <div class="pagewidth">
                <ul class="headernav">
                    <li><a href="/HyperMarket/ViewStoresServlet"><img class="headerlogo" src="./arts/logo.png" width="106" height="22" alt="Bagcheck Home" border="0" /></a></li>
                    <li class="headerlink "><a p='header' t='home' href="/HyperMarket/ViewStoresServlet">Home</a></li>
                    <li class="headerlink headerlinkhl"><a href="/HyperMarket/ViewStoresServlet" >View All Stores</a></li>
                    <li class="headerlink "><a p='header'  href="#" onclick="return false;">Create Stocks</a></li>
                    <li class="headerlink "><a p='header'  href="/HyperMarket/EndOfDayServlet">End Of Day</a></li>
                    <li class="headerlink "><a p='header'  href="/HyperMarket/LogoutServlet">Logout</a></li>

                </ul>
            </div>
        </div>
        <div class="container_12">
            <div class="grid_12">
                <h1 class="blogh1">Newly Created Stocks Report</h1>
            </div>
            <br>
            <br>
            <div class="grid_4">
                <img onerror="uploadFile()" src="./product/<%=stock.getStockImage()%>" height="180" width="200" id="imagedisplay" name="imagedisplay">

            </div>
            <div class="grid_4">
                <label class="labelHeight">Item's Name : <%=stock.getStockname()%></label><br>

                <label class="labelHeight">Set Threshold : <%=stock.getThreshold()%></label><br>

                <label class="labelHeight">Cost Price : $ <%=stock.getCostprice()%> </label><br>

                <label class="labelHeight">Selling Price : $ <%=stock.getSellingprice()%>  </label><br>

                <label class="labelHeight">Quantity : <%=stock.getQuantity()%> </label><br>

                <label class="labelHeight">Discount : % <%=stock.getDiscount()%> </label><br>

                <label class="labelHeight">Expiry Date : <%=stock.getExpiryDate()%> </label><br>
            </div>

            <div class="grid_4">

                <% if (!(errorlist.isEmpty() || errorlist == null)) {
                                out.println("<label class=\"labelHeight\"><font style=\"color:red\">Unable to create stock for this lists of Stores, please check if stocks already exists</font></label>");
                                out.println("<ol class=\"labelHeight\">");
                                for (int count = 0; count < errorlist.size(); count++) {
                                    out.println("<li> "+(count+1) +". ");
                                    out.println(errorlist.get(count) + "");
                                    out.println("</li>");
                                }
                                out.println("</ol>");
                            }
                            if (!(storenamelist.isEmpty() || storenamelist == null)) {
                                out.println("<label class=\"labelHeight\">Created for Stores : </label>");
                                out.println("<ol class=\"labelHeight\">");

                                for (int count = 0; count < storenamelist.size(); count++) {
                                    out.println("<li> "+(count+1) +". ");
                                    out.println(storenamelist.get(count) + "");
                                    out.println("</li>");
                                }
                                out.println("</ol>");
                            }
                %>
            </div>

        </div>
        <br>
        <br>
        <br>
        <br>
        <div class="container_12">
            <div class="prefix_3 grid_3">
                <form method-="post" action="/HyperMarket/createStockServlet" name="ford" id="ford">
                    <button class="ovaction ovactionbig ovactionprimary" style="margin: 5px 10px 0 -1px;" onclick="document.ford.submit();">Create More!</button>
                </form>
            </div>
            <div class="grid_3 suffix_3">
                <form method-="post" action="/HyperMarket/ViewStoresServlet" name="ford" id="ford">
                    <button class=" ovaction ovactionbig ovactionprimary" style="margin: 5px 10px 0 -1px;" onclick="document.ford.submit();">Done Creating</button>
                </form>
            </div>
        </div>

    </body>
</html>
